<template>
	<view :style="colorStyle">
		<view class="list" v-for="(item,index) in userBillList" :key="index">
			<image src="/static/images/battery1.png" class="img"></image>
			<view class="listl">
				<view class="title">预计收益:¥{{item.should_rebate_money}}</view>
				<view class="addres">{{item.shop_name}}</view>
			</view>
			<view class="listr">
				<view class="money">¥{{item.remaining_rebate_money}}</view>
				<view class="title">剩余预计收益</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		getUserCoupons
	} from '@/api/api.js';
	import {
		getBillBattery
	} from '@/api/user.js';	
	import {
		toLogin
	} from '@/libs/login.js';
	import {
		mapGetters
	} from "vuex";
	// #ifdef MP
	import authorize from '@/components/Authorize';
	// #endif
	import home from '@/components/home';
	import colors from '@/mixins/color.js';
	export default {
		components: {
			// #ifdef MP
			authorize,
			// #endif
			home
		},
		mixins: [colors],
		data() {
			return {
				page:1,
				userBillList: []
			};
		},

		onLoad() {
			
			
		},
		onShow() {
			this.getUserBillList();
		},
		onReachBottom() {
			
		},
	

		methods: {
			getUserBillList: function() {
				let that = this;
				if (that.loadend) return;
				if (that.loading) return;
				that.loading = true;
				that.loadTitle = "";
				let data = {

				}
				getBillBattery(data).then(function(res) {
					let list = res.data;
					that.userBillList=list;
					console.log(list)
				}, function(res) {
					that.loading = false;
					that.loadTitle = '加载更多';
				});
			}
		}

	}
</script>


<style lang="less" scoped>
	.list{
		display: flex;
		overflow: hidden;
		align-items: center;
		width: 690rpx;
		height: 160rpx;
		background: #FFFFFF;
		border-radius: 10rpx;
		margin: 20rpx auto 0;
		padding: 0 30rpx;
		box-sizing: border-box;
		.img{
			flex: 0 0 100rpx;
			height: 100rpx;
			display: block;
		}
		.listl{
			flex: 1;
			padding-left: 21rpx;
			overflow: hidden;
			.title{
				font-weight: 500;
				color: #252525;
				line-height: 42rpx;
				font-size: 30rpx;
				padding-bottom: 10rpx;
			}
			.addres{
				font-size: 24rpx;
				color: #999999;
				line-height: 33rpx;
				height: 33rpx;
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;
			}
		}
		.listr{
			flex: 0 0 197rpx;
			text-align: right;
			.money{
				font-weight: 500;
				color: #FE4869;
				line-height: 42rpx;
				font-size: 30rpx;
			}
			.title{
				color: #252525;
				line-height: 33rpx;
				padding-top: 10rpx;
				font-size: 24rpx;
			}
		}
	}
</style>
